﻿<app:SpottedPageBase
    x:Class="Spotted.Views.PlacesMapView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:app="clr-namespace:Spotted.Core"
    xmlns:cal="http://www.caliburnproject.org" xmlns:uc="clr-namespace:Spotted.Controls"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="696" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot">
        <uc:SpottedMapView ZoomLevel="{Binding ZoomLevel}"
                                 CenterLocation="{Binding CenterLocation}"
                                 Places="{Binding Places}" x:Name="theMap"
                                 cal:Message.Attach="[Event PlaceSelected] = [Action PlaceSelected($eventArgs)]">
        </uc:SpottedMapView>
    </Grid>

    <!-- The application bar -->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True">
            <shell:ApplicationBar.Buttons>
                <cal:AppBarButton IconUri="/Assets/Icons/appbar.add.rest.png"
                                  Text="add spot"
                                  Message="AddLocation" />
                <cal:AppBarButton IconUri="/Assets/Icons/appbar.refresh.png"
                                  Text="refresh"
                                  Message="RefreshLocation" />
            </shell:ApplicationBar.Buttons>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</app:SpottedPageBase>
